package com.snail.readyvr.activity;

import com.snail.readyvr.R;
import com.snail.readyvr.ui.CommonTopBar;
import com.snail.readyvr.util.Utils;

import butterknife.BindView;

/**
 * Created by MRKING on 2017/3/15.
 */

public class UserAgreementActivity extends BaseWebViewActivity implements CommonTopBar.OnClickCommonTopBar{

    @BindView(R.id.user_agreement_top_bar)
    CommonTopBar mUserAgreementTopBar;
    @Override
    protected int getLayoutId() {
        return R.layout.activity_user_agreement;
    }

    @Override
    protected void init() {
        mUserAgreementTopBar.midTextView.setText(R.string.user_agreement_title);
        mUserAgreementTopBar.setOnClickCommonTopBar(this);
        loadUrl(Utils.USER_AGREEMENT_URL);
    }

    @Override
    protected void hasGetAllPermissions() {

    }

    @Override
    public void onClickLeftView() {
        if(mWebView != null && mWebView.canGoBack())
            mWebView.goBack();
        else
            finish();
    }

    @Override
    public void onClickRightView() {

    }
}
